﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using JM.JCY.BusinessEntity;

namespace JM.JCY.Common
{
    public interface IUserManagement
    {
        DataSetUserManagement.T_DepartmentDataTable GetAllDepartment();
        bool UpdateDepartmentSortOrder(string deptName, int sortOrder);
        void UpdateDepartmentSortOrder(DataSetUserManagement.T_DepartmentDataTable dt);
        DepartmentTitleDataSet.T_DeptTitleDataTable GetDeptTitleList();
        void CreateNewDepartment(DataSetUserManagement ds);
        int IsExistDept(string DeptName);
        bool DelDeptById(int deptId);
        DataSetUserManagement.T_JobTitleDataTable GetTitleByDeptId(int deptId);
        DataSetUserManagement GetDepartmentTitleById(int deptId);
        DataSetUserManagement.T_UserInfoDataTable SearchUserInfo(string name, int deptId, int jobTitleId, string status);
        DepartmentTitleDataSet.T_DeptTitleDataTable GetDeptTitleByUserId(int userId);



        // update by Hong Liang
        FrameworkDataset.T_MyCommitteeDataTable GetMyCommittee(string userName);
        DataSetUserManagement.T_DepartmentDataTable GetDeptById(int deptId, string deptName);
        DataSetUserManagement.T_UserInfoDataTable GetUser(int userId, string userName);
        DepartmentTitleDataSet.T_DepartmentJobTitleDataTable GetUserDeptTitle(int userId);
        void UpdateUserDept(DepartmentTitleDataSet.T_UserDepartmentDataTable dt);
        void UpdateUserJobTitle(DepartmentTitleDataSet.T_UserJobTitleDataTable dt);
        DepartmentTitleDataSet.T_UserDepartmentDataTable GetUserDeptByUserId(int userId);
        DepartmentTitleDataSet.T_UserJobTitleDataTable GetUserJobTiTleByUserId(int userId);
        void UpdateUserInfo(DataSetUserManagement.T_UserInfoDataTable dt);
        DepartmentTitleDataSet.T_JobTitle_MemberDataTable GetUserJobtitle(int userId, int deptId);
        DepartmentTitleDataSet.T_Dept_MemberDataTable GetDepartmentMember(int deptId);
        DepartmentTitleDataSet.T_UserInfo_PersonalDataTable GetUserForHome(int userId);
        DepartmentTitleDataSet.T_User_Related_DeptDataTable GetUserRelatedDept(string userName);
        DepartmentTitleDataSet.T_UserDepartmentDataTable GetUserDeptMatch(int userId, int deptId);
        DepartmentTitleDataSet.T_User_Dept_DataDataTable GetUserDept(int userId);


        // for committee
        CommitteeDataSet.T_CommitteeDataTable GetCommitteeById(int committeeId);
        CommitteeDataSet.T_Committee_MemberDataTable GetCommitteeMember(int committeeId);
        void UpdateCommittee(CommitteeDataSet.T_CommitteeDataTable dt);
        void UpdateUserComittee(CommitteeDataSet.T_UserCommitteeDataTable dt);
        CommitteeDataSet.T_UserCommitteeDataTable GetUserCommitteeById(int userCommitteeId);
        CommitteeDataSet.T_CommitteeDataTable GetCommitteeByName(string committeeName);
        CommitteeDataSet.T_UserCommitteeDataTable GetUserCommitteeMatch(int userId, int committeeId);

        DepartmentTitleDataSet.T_UserDepartmentDataTable GetUserDepartmentByDeptId(int deptId);
        void UpdateDepartmentMemeberSortOrder(DepartmentTitleDataSet.T_UserDepartmentDataTable dt);
        // contact
        DepartmentTitleDataSet.T_User_ContactDataTable GetUserContactByName(string userName);
        DepartmentTitleDataSet.T_User_ContactDataTable GetUserContactForHome(string userName, int count);
        DataSetUserManagement.T_UserInfoDataTable GetUserForSystem(int userId);

        void CreateDeptMgr(UserInfoDataSet.T_DeptMgrDataTable dt);
        void DeleteDeptMgrByUserName(string userName);
        UserInfoDataSet.T_DeptMgrDataTable GetUserDeptMgr(string userName);

        void DeleteUserById(int userId);
        
      
    }
}



